- name: d8.node-os-requirements
  rules:
    - alert: D8NodeHasDeprecatedOSVersion
      expr: >-
        count(kube_node_info{os_image=~"Ubuntu 18.04.*"}) > 0
      for: 5m
      labels:
        severity_level: "4"
        tier: cluster
      annotations:
        plk_markup_format: markdown
        plk_protocol_version: "1"
        summary: Nodes have deprecated OS versions.
        description: |-
          Some nodes have deprecated OS versions. Please update nodes to actual OS version.

          To observe affected nodes use the expr `kube_node_info{os_image=~"Ubuntu 18.04.*"}` in Prometheus.
    - alert: D8NodeHasDeprecatedOSVersion
      expr: >-
        count(kube_node_info{os_image=~"Debian GNU/Linux 9.*"}) > 0
      for: 5m
      labels:
        severity_level: "4"
        tier: cluster
      annotations:
        plk_markup_format: markdown
        plk_protocol_version: "1"
        summary: Nodes have deprecated OS versions.
        description: |-
          Some nodes have deprecated OS versions. Please update nodes to actual OS version.

          To observe affected nodes use the expr `kube_node_info{os_image=~"Debian GNU/Linux 9.*"}` in Prometheus.
